package jdbc;

import java.util.List;

import jdbc.entity.Employees;

public class EmployeesDao extends BaseDao<Employees> {
	public EmployeesDao() {

	}
	
	public List<Employees> gtAvSalary(){
		String sql="select * from employees a  where a.salary>("
				+ "select round(avg(e.salary)) from employees e where e.department_id = a.department_id)"
				+ "order by a.department_id";
		
		return findBySql(sql);
	}
	
}
